const initialState = {
  username: '',
  password: '',
  verify: '8888',
};

export const SignFormActions = {
  SIGN_FORM_UPDATE: 'sign_form_update',
};

export function updateSignForm(payload) {
  return {
    type: SignFormActions.SIGN_FORM_UPDATE,
    payload,
  };
}

export default function signForm(state = initialState, action) {
  switch (action.type) {
    case SignFormActions.SIGN_FORM_UPDATE:
      return {...state, ...action.payload};
    default:
      return state;
  }
}
